
<include file="Public/header"/> 

<!-- start: Content -->
<div id="content" class="span10">
    <!--面包屑开始-->
    <ul class="breadcrumb">
        <li>
            <i class="icon-home"></i>
            <a href="index.html">主页</a> 
            <i class="icon-angle-right"></i>
        </li>
        <li><a href="#">题库管理</a></li>
    </ul>
    <!--面包屑结束-->

    <!--内容区域开始-->
    <div class="row-fluid">		
        <div class="box span12">
            <div class="box-header" data-original-title>
                <h2><i class="halflings-icon user"></i><span class="break"></span>题库列表</h2>
                <div class="box-icon">
                    <a href="__APP__/Home/Questions/add?id={$data.q_sid}" class="btn-add-questions"><i class="halflings-icon plus"></i></a>

                    <a href="#" class="btn-minimize"><i class="halflings-icon chevron-up"></i></a>
                    <a href="#" class="btn-close"><i class="halflings-icon remove"></i></a>
                </div>
            </div>
            <div class="box-content">
                <table class="table table-striped table-bordered">
                    <thead>
                        <tr>
                            <th>问题ID</th>
                            <th>问题内容</th>
                            <th>问题答案</th>
                            <th>问题图片</th>
                            <th>问题类型</th>
                            <th>管理</th>
                        </tr>
                    </thead>   
                    <tbody>
                    <volist name="list" id="vo"> 
                        <tr>
                            <td class="center column_id">{$vo.q_id}</td>
                            <td class="center column_name">{$vo.q_content}</td>
                            <td class="center column_link">{$vo.q_answer}</td>
                        <if condition ="($vo.q_img eq null)">
                            <td class="center">没有图片</td>
                            <else/>
                            <td class="center"  style="cursor: pointer"><img src="{$vo.q_img}" class="column_link" title="" alt="" style="width: 80px; height: 80px;" /></td>
                        </if>
                        <if condition="($vo.q_type eq 1)">
                            <td class="center column_link">选择</td>
                            <else/>
                            <td class="center column_link">填空</td>
                        </if>

                        <td class="center">
                            <a class="btn btn-info edit-column" href="__APP__/Home/Questions/save?id={$vo.q_id}&sid={$vo.q_sid}">
                                <i  class="halflings-icon white edit"></i>  
                            </a>
                            <a class="btn btn-danger" href="__APP__/Home/Questions/delete?id={$vo.q_id}&sid={$vo.q_sid}" onClick="return confirm('确认要删除？');" >
                                <i class="halflings-icon white trash"></i> 
                            </a>
                        </td>
                        </tr>
                    </volist>
                    </tbody>
                </table>            
            </div>
            <div class="pagination"> 
                {$page}
            </div>
        </div><!--/span-->

    </div>
     <!--图片修改模态窗口开始-->
    <div class="modal hide fade" id="images-link-model">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal">×</button>
            <h3 id="image-link-title">图片预览</h3>
        </div>
        <img style="height:400px;width:100%" id="model-link-iamges"/>
    </div>
    <!--修改模态窗口结束-->
    <script>
           //重新绑定点击事件
            $(".btn-add-questions").click(function() {
                 window.location.href = $(".btn-add-case").attr("href");
            });
          /**
             *点击图片 
             */
           $('.column_link').click(function(e){
               e.preventDefault();
               $("#model-link-iamges").attr("src",$(this).attr("src"));
               $("#image-link-title").html($(this).attr("title"));
               $('#images-link-model').modal('show');
           });


           //设置字符长度
           
    </script>
    <!--内容区域结束-->
    <include file="Public/footer"/>             





